home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 February: Tool Chest / Dev.CD Feb 94.toast / New System Software Extensions / QuickDraw™ GX v1.0ß2 / Sample Code / Printing Samples / Printer Drivers… / LaserWriterIISC / ChooserSupport.r < prev    next >
Encoding:
Text File  |  1993-09-13  |  4.3 KB  |  169 lines  |  [TEXT/MPS ]

  1. /* ------------------------------------------------------------------------------
  2. FILENAME
  3.     ChooserSupport.r
  4.  
  5. DESCRIPTION
  6.     This module contains the LaserWriter SC constants, types, and resources that
  7.     are needed in order for the driver to work with the Chooser.
  8.             
  9.     Note: all resources should be designated to load into the system heap.
  10.  
  11.     9/13/93 - dmh - Updated for the b2 seed.
  12.  
  13. COPYRIGHT
  14.      Copyright Apple Computer, Inc. 1992
  15.      All rights reserved. 
  16.     
  17. -------------------------------------------------------------------------------- */
  18.  
  19. // System 7.0 Compatible
  20. #define SystemSevenOrLater        1
  21.  
  22. // Include System Resource Definitions
  23. #include "Types.r"
  24. #include "SysTypes.r"
  25.  
  26. // Include the LaserWriter SC driver constants that are used in the resources 
  27. #include "Resources.h"
  28.  
  29. // Include the public QuickDraw GX printing files 
  30. #include "PrintingResTypes.r"
  31.  
  32. // Include the LaserWriterSC Driver's LDEF and PACK Code Segments ===== */
  33.  
  34. include "LWSC_PACK";
  35. include "LWSC_LDEF";
  36.  
  37.  
  38. /*********************************************************************************************
  39.      THINGS TO CONTROL THE DEFAULT CHOOSING MECHANSIM
  40. *********************************************************************************************/
  41.  
  42. // The 'look' resource is used by the driver's PACK to know how to communicate 
  43. // to the device.  This resource contains the default settings, as the actual value 
  44. // can be found in the desktop printer. 
  45.  
  46. resource 'look' (kLookRsrcID, sysheap, purgeable) 
  47. {
  48.     1,                                    // use the first in our list by default
  49.     {
  50.         "SCSI",            kSCSICommRsrcID,                iconCells,                                "";
  51.         "Servers",        kPrinterShareCommRsrcID,    isAppleTalk+isPrinterShare,        "LaserWriterSCIS";
  52.     };
  53. };
  54.  
  55.  
  56. // This 'comm' resource defines the default communication settings when using this 
  57. // driver with PrinterShare. 
  58.  
  59. resource 'comm' (kPrinterShareCommRsrcID, sysheap, purgeable)
  60. {
  61.     PrinterShare
  62.     {
  63.         "",
  64.         0
  65.     };
  66. };
  67.  
  68.  
  69. // This 'comm' resource defines the default communication settings when using this 
  70. // driver with direct SCSI communications. 
  71.  
  72. resource 'comm' (kSCSICommRsrcID, sysheap, purgeable)
  73. {
  74.     SCSI
  75.     {
  76.         0,                                        // release device routine 
  77.         0,                                        // io attibutes 
  78.         0,                                        // status byte 
  79.         0,                                        // scsi bus number 
  80.         0,                                        // scsi ID 
  81.         0,                                        // chunk level 
  82.         0,                                        // acquire routine (use default)  
  83.         2,                                        // deviceType to look for 
  84.         27,                                    // minimum length of additional response data 
  85.         8,                                        // bytes from start for search 
  86.         "APPLE   PERSONAL LASER  ",    // search string 
  87.     };
  88. };
  89.     
  90.  
  91. /*********************************************************************************************
  92.     STANDARD CHOOSER PACK STUFF
  93. *********************************************************************************************/
  94.  
  95. // NBP Lookup type (maxed out so resource file won't need updating)
  96. resource 'STR ' (-4096, sysheap, purgeable)
  97. {
  98.     "XXXXXXXXXXXXXXXXXXXXXX";
  99. };
  100.  
  101. // NBP timeout value
  102. type 'GNRL'
  103. {
  104.     byte;    // timeout
  105.     byte;    // retries
  106. };
  107.  
  108. resource 'GNRL' (-4096, sysheap, purgeable)
  109. {
  110.     11,
  111.     5
  112. };
  113.  
  114. // title string (we'll put a control here, so we don't want a title)
  115. resource 'STR ' (-4091, sysheap, purgeable)
  116. {
  117.     "";
  118. };
  119.  
  120. // "left" button title
  121. resource 'STR ' (-4093, sysheap, purgeable)
  122. {
  123.     "Create";
  124. };
  125.  
  126. // rectangle list
  127. resource 'nrct' (-4096, sysheap, purgeable) {
  128.     {
  129.     {112, 251, 132, 311};            // left button
  130.     {0,0,0,0};                            // right button
  131.     {-101, 180, -101+20, 400};        // on button (location of device list - popup is placed here)
  132.     {0,0,0,0};                            // off button
  133.     {0,0,0,0};                            // button label
  134.     };
  135. };
  136.  
  137. // Menu used to select between direct connect, AppleTalk, and Servers
  138. resource 'MENU' (-4096, sysheap, purgeable)
  139. {
  140.     -4096,
  141.     textMenuProc,
  142.     0xFFFFFFFF,    
  143.     enabled,
  144.     "",
  145.     {
  146.     }
  147. };
  148.  
  149. // Pop-up control used to select between direct connect printers and those being shared on the network
  150. resource 'CNTL' (-4096, sysheap, purgeable)
  151. {
  152.     {0, 0, 20, 205},                            // zero based control location
  153.     0,                                                // Title options 0 = Left justified
  154.     visible,                                        // Should we display the control?
  155.     100,                                            // Title Width
  156.     -4096,                                        // 'MENU' to display
  157.     popupMenuCDEFproc+popupFixedWidth,    // CDEF = CDEFID * 16 + varCode
  158.     0,                                             // refCon = ResType to append = None
  159.     "Connect via:"                                // Control title
  160. };
  161.  
  162. resource 'DITL' (-4096, sysheap, purgeable) 
  163. {
  164.     {
  165.         {3, 250, 23, 250 + 205}, 
  166.             Control {enabled, -4096},
  167.     };
  168. };
  169.